import request from '@/utils/request'

// 查询农产品档案列表
export function listArchive(query) {
  return request({
    url: '/ncpsy/archive/list',
    method: 'get',
    params: query
  })
}

// 查询农产品档案详细
export function getArchive(primaryId) {
  return request({
    url: '/ncpsy/archive/' + primaryId,
    method: 'get'
  })
}

// 查询农产品档案数量
export function countArchive(query) {
  return request({
    url: '/ncpsy/archive/count',
    method: 'get',
    params: query
  })
}

// 新增农产品档案
export function addArchive(data) {
  return request({
    url: '/ncpsy/archive',
    method: 'post',
    data: data
  })
}

// 修改农产品档案
export function updateArchive(data) {
  return request({
    url: '/ncpsy/archive',
    method: 'put',
    data: data
  })
}

// 删除农产品档案
export function delArchive(primaryId) {
  return request({
    url: '/ncpsy/archive/' + primaryId,
    method: 'delete'
  })
}

export function comcount(query) {
  return request({
    url: '/ncpsy/archive/comCount',
    method: 'get',
    params: query
  })
}
